<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>upload</title>
		<meta name="author" content="Administrator" />
		<!-- Date: 2014-05-28 -->
		<script type="text/javascript" src="../resources/common/lib/jquery-1.10.2.js"></script>
		<script type="text/javascript" src="../resources/common/util/AjaxUtils.js"></script>
		<script type="text/javascript" src="../resources/common/lib/json.js"></script>
		<script type="text/javascript" src="../resources/common/util/JsonUtils.js"></script>
		<script type="text/javascript" src="../resources/common/util/ArrayUtils.js"></script>
		<script type="text/javascript" src="../resources/common/util/Map.js"></script>
		<script type="text/javascript" src="../resources/uploadify/util/UploadifyUtils.js"></script>
		<script type="text/javascript" src="../resources/uploadify/jquery.uploadify.js"></script>
		<link href="../resources/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
		<!--ready事件-->
		<script type="text/javascript">
			$(function() {
				var uploadify_base = '../resources/uploadify';
				$('#file_upload').uploadify({
					'swf' : uploadify_base + '/uploadify.swf', //指定上传控件的主体文件，默认‘uploader.swf’
					'uploader' : '../php/upload/upload.php?action=upload', //指定服务器端上传处理文件，默认‘upload.php’
					'cancelImg' : uploadify_base + '/uploadify-cancel.png', //指定取消上传的图片，默认‘cancel.png’
					'fileDesc' : 'rar文件或zip文件', //出现在上传对话框中的文件类型描述
					'auto' : false, //选定文件后是否自动上传，默认false
					buttonText : '选择文件', //浏览按钮的文本，默认值：BROWSE
					multi : true, //设置为true时可以上传多个文件,默认为false
					fileObjName : 'files[]', //上传文件name,默认为fileData
					onDialogClose : function(queueData) {

						var url = '../php/upload/upload.php?action=getFileList';
						var data = {};
						UploadifyUtils.cancel(url, data, queueData, $('#file_upload'));
					}
				});
			});
		</script>

	</head>

	<body>
		<input type="file" id="file_upload" />
		<div>
			<a href="javascript:$('#file_upload').uploadify('upload','*')">上传</a>| <a href="javascript:$('#file_upload').uploadify('cancel','*')">取消上传</a>
		</div>
		<div id="pro"> </div>
	</body>
</html>

